<template>
  <addYgdaForm :employeeObj="employeeObj"></addYgdaForm>
</template>
<script setup name="EditYgda">
import { reactive, toRaw, toRefs, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import addYgdaForm from '../addOrUpdateYgda/index.vue'
const route = useRoute()
console.log('route', route.query)
const data = reactive({
  employeeObj: {}
})
const { employeeObj } = toRefs(data)
watch(
  () => route.query.employeeId,
  val => {
    if (route.query.employeeId) {
      employeeObj.value = route.query
    }
  },
  { immediate: true }
)
</script>
